﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CodePlex.Resourceful.Microsoft.Azure
{

    public enum AzurePropertyType
    {
        EdmBinary,
        EdmBoolean,
        EdmDateTime,
        EdmDouble,
        EdmGuid,
        EdmInt32,
        EdmInt64,
        EdmString
    }

    public class AzureProperty
    {
        public string Name;
        public AzurePropertyType Type;
        public object Value;

        public AzureProperty(string name, AzurePropertyType type, object value)
        {
            this.Name = name;
            this.Type = type;
            this.Value = value;
        }


        public static AzureProperty Binary(string name, byte[] value)
        {
            return new AzureProperty(name, AzurePropertyType.EdmBinary, value);
        }
        public static AzureProperty Boolean(string name, bool? value)
        {
            return new AzureProperty(name, AzurePropertyType.EdmBoolean, value);
        }
        public static AzureProperty DateTime(string name, DateTime? value)
        {
            return new AzureProperty(name, AzurePropertyType.EdmDateTime, value);
        }
        public static AzureProperty Double(string name, double? value)
        {
            return new AzureProperty(name, AzurePropertyType.EdmDouble, value);
        }
        public static AzureProperty Guid(string name, Guid? value)
        {
            return new AzureProperty(name, AzurePropertyType.EdmGuid, value);
        }
        public static AzureProperty Int32(string name, int? value)
        {
            return new AzureProperty(name, AzurePropertyType.EdmInt32, value);
        }
        public static AzureProperty Int64(string name, long? value)
        {
            return new AzureProperty(name, AzurePropertyType.EdmInt64, value);
        }
        public static AzureProperty String(string name, string value)
        {
            return new AzureProperty(name, AzurePropertyType.EdmString, value);
        }








    }
}
